Field of the Invention
The present invention relates to a USB device and in particular to a USB device that does not interrupt the current function being performed when other functions are added or removed.
Description of the Related Art
A Universal Serial Bus (USB) device or a USB device controller is widely applied in smart phones and is arranged to connect to a host, such as a personal computer, so as to interchange data with the host. The smart phone is regarded as a USB device with one or more functions when connecting to the host. After the smartphone is connected to the host, the user is unable to add or remove functions. For example, the smart phone is regarded as a USB device with a data-transmitting function when the smart phone is connected to the host. While connected, the smart phone is unable to additionally add a camera function. The connection between the smart phone and the host must be interrupted, if the camera function is to be additionally performed by the smart phone, so a descriptor relating to the camera function and the data-transmitting function is prepared by the host again. Then, the smart phone is able to perform the camera function and the data-transmitting function at the same time, when the connection between the smart phone and the host is re-built again. In short, the function currently being performed would be interrupted when the USB composite device adds or removes functions.
Therefore, there is a need to provide a new USB device and a method for processing data by the USB device to resolve the above problem.